Skip to content

Add file scoped namespaces support to GetNamespace method#531

Merged
StevenTCramer merged 3 commits intoTimeWarpEngineering:masterfrom
archiether:file-scoped-namespaces
Jun 20, 2025
Merged

Add file scoped namespaces support to GetNamespace method#531
StevenTCramer merged 3 commits intoTimeWarpEngineering:masterfrom
archiether:file-scoped-namespaces

Conversation

@archiether
Copy link
Copy Markdown
Contributor

No description provided.

@StevenTCramer StevenTCramer requested a review from Copilot June 19, 2025 10:53
@TimeWarpEngineering TimeWarpEngineering deleted a comment from claude Bot Jun 19, 2025
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds support for C# 12 file-scoped namespaces to the existing GetNamespace helper.

  • Extends the loop condition to recognize FileScopedNamespaceDeclarationSyntax nodes.
  • Updates the return expression to handle both block-scoped and file-scoped namespace syntax.
Comments suppressed due to low confidence (1)

Source/TimeWarp.State.SourceGenerator/ActionSetMethodGenerator.cs:194

  • Add a unit test to verify that GetNamespace returns the correct name for a file-scoped namespace declaration to ensure this new behavior is covered.
      private static string GetNamespace(ClassDeclarationSyntax classDeclaration)

Comment thread Source/TimeWarp.State.SourceGenerator/ActionSetMethodGenerator.cs Outdated
Comment thread Source/TimeWarp.State.SourceGenerator/ActionSetMethodGenerator.cs Outdated
@archiether archiether force-pushed the file-scoped-namespaces branch from c71695a to 4c787f8 Compare June 20, 2025 03:29
@archiether archiether force-pushed the file-scoped-namespaces branch from 4c787f8 to e4695b6 Compare June 20, 2025 03:32
This change allows using the same ActionSet name under different State names within the same namespace.
@StevenTCramer StevenTCramer merged commit 2fc694d into TimeWarpEngineering:master Jun 20, 2025
1 check failed
@StevenTCramer
Copy link
Copy Markdown
Collaborator

Sorry I inadvertently merged this thinking it was a different one. Will review and get it in

@StevenTCramer
Copy link
Copy Markdown
Collaborator

merged and released 11.0.3 Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants